package com.gxuwz.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;

/**
 * <p>
 * 
 * </p>
 *
 * @author 刘玉霜
 * @since 2017-10-27
 */
public class Purchase extends Model<Purchase> {

    private static final long serialVersionUID = 1L;

    /** 发票号、流水号使用此ID */
	private String id;
	@TableField("user_id")
	private Integer userId;
	@TableField("is_submit")
	private Integer isSubmit;
	
	/** 是否入库：0、未入库  1、已入库 */
	@TableField("is_storage")
	private Integer isStorage;
	
	@TableField("create_time")
	private String createTime;
	
	/** 多对一关系，一个用户可以创建很多张订单 */
	private User user;
    //private List<User> user = new ArrayList<User>();  

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getIsSubmit() {
		return isSubmit;
	}

	public void setIsSubmit(Integer isSubmit) {
		this.isSubmit = isSubmit;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public Integer getIsStorage() {
		return isStorage;
	}

	public void setIsStorage(Integer isStorage) {
		this.isStorage = isStorage;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Purchase{" +
			"  id=" + id +
			", userId=" + userId +
			", isSubmit=" + isSubmit +
			", isStorage=" + isStorage +
			", createTime=" + createTime +
			"}";
	}
}
